package com.java.comprehensive.thread.stream;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;

/**
 * @program: comprehensive-service
 *
 * @description:
 *
 * @author: 窦绍飞
 *
 * @create: 2021-12-07 10:31
 **/
public class Demo {
	public static void main(String[] args) {
		Cache<String, String> cache = CacheBuilder.newBuilder().build();
		String s = cache.getIfPresent("word");
		System.out.println(s);
	}

	public static void cahePut() {
		Cache<String, String> cache = CacheBuilder.newBuilder().build();
		cache.put("word", "Hello Guava Cache");
	}
}
